<template>
  <div class="menu">
    <PageContent
      tableName="menu"
      :table-config="tableConfig"
      @create-click="handleCreateClick"
      @edite-click="handleEditeClick"
    />

    <PageDialog
      tableName="menu"
      :dialog-config="dialogConfig"
      :edite-data="editeData"
      ref="pageDialogRef"
    />
  </div>
</template>

<script setup lang="ts">
import PageContent from '@/components/page-content/PageContent.vue';
import PageDialog from '@/components/page-dialog/PageDialog.vue';

import { tableConfig } from './config/table-config';
import { dialogConfig } from './config/dialog-config';

import useDialog from '@/hooks/useDialog';
const [ pageDialogRef,
        editeData,
        handleCreateClick,
        handleEditeClick  ] = useDialog()
</script>

<style scoped>

</style>